﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../JS/jquery.js" ></script>
<script src="../JS/getcookie.js" ></script>
<script>
$(document).ready(function(){
	if( getCookie("name") != "" )
	{
		$("#name").html( getCookie("name")+"登录成功~" );
	}
	else
	{
		alert("请登录");
		history.go(-1);
	}
	
	$("#logout").click(function(){
		delCookie("name");
		$("#name").html( "" );
	});
});
</script>
</head>

<body>
	<p id="name"></p>
	<input id = "logout" type = "button" value = "logout" />
</body>
</html>